var $oContent;
function fadeOut()
{
	$oContent.stop().animate({"opacity":"0.35"}, 500);
}

function fadeIn()
{
	$oContent.stop().animate({"opacity":"1.0"}, 500);
}

$( document ).ready(function() {
	$oContent = $( "#content" );
	var filename = document.location.toString().substr(document.location.toString().lastIndexOf("/")+1);

	if((sessionStorage.getItem("back-button-pressed") == null || sessionStorage.getItem("back-button-pressed") === "false") && (filename == "index.html")) {
		document.getElementById('content').style.opacity = 0.35;
	} else if (sessionStorage.getItem("back-button-pressed") === "true"){
		document.getElementById('content').style.opacity = 1.0;
	}
	
	$( "#content" ).mouseover("mouseenter", fadeIn);
	$( "#content" ).bind("mouseleave", fadeOut);
	
	sessionStorage.setItem("back-button-pressed", false);
});